const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  //...
  devServer: {
    port: 11023,
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
    allowedHosts: [
      'frp-era.com',
      '.frp-era.com'   
    ],
    client: {
      webSocketURL: {
        hostname: '0.0.0.0',
        pathname: '/ws',
        port: 11023,
        protocol: 'wss'
      }
    },
    //  开发模式跨域处理
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        target: `https://113.219.237.77:11024`,
        changeOrigin: true,
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: '/'
        }
      }
    }
    
  }
});